home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / FixMath.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  4.5 KB  |  275 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        FixMath.a
  3. ;
  4. ;    Contains:    Fixed Math Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__FIXMATH__') = 'UNDEFINED' THEN
  21. __FIXMATH__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29. fixed1                            EQU        $00010000
  30. fract1                            EQU        $40000000
  31. positiveInfinity                EQU        $7FFFFFFF
  32. negativeInfinity                EQU        $80000000
  33.  
  34. ;
  35. ; pascal Fract Fix2Frac(Fixed x)
  36. ;
  37.     IF ¬ GENERATINGCFM THEN
  38.         _Fix2Frac:    OPWORD    $A841
  39.     ELSE
  40.         IMPORT_CFM_FUNCTION    Fix2Frac
  41.     ENDIF
  42.  
  43. ;
  44. ; pascal long Fix2Long(Fixed x)
  45. ;
  46.     IF ¬ GENERATINGCFM THEN
  47.         _Fix2Long:    OPWORD    $A840
  48.     ELSE
  49.         IMPORT_CFM_FUNCTION    Fix2Long
  50.     ENDIF
  51.  
  52. ;
  53. ; pascal Fixed Long2Fix(long x)
  54. ;
  55.     IF ¬ GENERATINGCFM THEN
  56.         _Long2Fix:    OPWORD    $A83F
  57.     ELSE
  58.         IMPORT_CFM_FUNCTION    Long2Fix
  59.     ENDIF
  60.  
  61. ;
  62. ; pascal Fixed Frac2Fix(Fract x)
  63. ;
  64.     IF ¬ GENERATINGCFM THEN
  65.         _Frac2Fix:    OPWORD    $A842
  66.     ELSE
  67.         IMPORT_CFM_FUNCTION    Frac2Fix
  68.     ENDIF
  69.  
  70. ;
  71. ; pascal Fract FracMul(Fract x, Fract y)
  72. ;
  73.     IF ¬ GENERATINGCFM THEN
  74.         _FracMul:    OPWORD    $A84A
  75.     ELSE
  76.         IMPORT_CFM_FUNCTION    FracMul
  77.     ENDIF
  78.  
  79. ;
  80. ; pascal Fixed FixDiv(Fixed x, Fixed y)
  81. ;
  82.     IF ¬ GENERATINGCFM THEN
  83.         _FixDiv:    OPWORD    $A84D
  84.     ELSE
  85.         IMPORT_CFM_FUNCTION    FixDiv
  86.     ENDIF
  87.  
  88. ;
  89. ; pascal Fract FracDiv(Fract x, Fract y)
  90. ;
  91.     IF ¬ GENERATINGCFM THEN
  92.         _FracDiv:    OPWORD    $A84B
  93.     ELSE
  94.         IMPORT_CFM_FUNCTION    FracDiv
  95.     ENDIF
  96.  
  97. ;
  98. ; pascal Fract FracSqrt(Fract x)
  99. ;
  100.     IF ¬ GENERATINGCFM THEN
  101.         _FracSqrt:    OPWORD    $A849
  102.     ELSE
  103.         IMPORT_CFM_FUNCTION    FracSqrt
  104.     ENDIF
  105.  
  106. ;
  107. ; pascal Fract FracSin(Fixed x)
  108. ;
  109.     IF ¬ GENERATINGCFM THEN
  110.         _FracSin:    OPWORD    $A848
  111.     ELSE
  112.         IMPORT_CFM_FUNCTION    FracSin
  113.     ENDIF
  114.  
  115. ;
  116. ; pascal Fract FracCos(Fixed x)
  117. ;
  118.     IF ¬ GENERATINGCFM THEN
  119.         _FracCos:    OPWORD    $A847
  120.     ELSE
  121.         IMPORT_CFM_FUNCTION    FracCos
  122.     ENDIF
  123.  
  124. ;
  125. ; pascal Fixed FixATan2(long x, long y)
  126. ;
  127.     IF ¬ GENERATINGCFM THEN
  128.         _FixATan2:    OPWORD    $A818
  129.     ELSE
  130.         IMPORT_CFM_FUNCTION    FixATan2
  131.     ENDIF
  132.  
  133.     IF GENERATINGPOWERPC  THEN
  134. ;
  135. ; short WideCompare(const wide *target, const wide *source)
  136. ;
  137.     IF GENERATINGCFM THEN
  138.         IMPORT_CFM_FUNCTION    WideCompare
  139.     ENDIF
  140.  
  141. ;
  142. ; WidePtr WideAdd(wide *target, const wide *source)
  143. ;
  144.     IF GENERATINGCFM THEN
  145.         IMPORT_CFM_FUNCTION    WideAdd
  146.     ENDIF
  147.  
  148. ;
  149. ; WidePtr WideSubtract(wide *target, const wide *source)
  150. ;
  151.     IF GENERATINGCFM THEN
  152.         IMPORT_CFM_FUNCTION    WideSubtract
  153.     ENDIF
  154.  
  155. ;
  156. ; WidePtr WideNegate(wide *target)
  157. ;
  158.     IF GENERATINGCFM THEN
  159.         IMPORT_CFM_FUNCTION    WideNegate
  160.     ENDIF
  161.  
  162. ;
  163. ; WidePtr WideShift(wide *target, long shift)
  164. ;
  165.     IF GENERATINGCFM THEN
  166.         IMPORT_CFM_FUNCTION    WideShift
  167.     ENDIF
  168.  
  169. ;
  170. ; unsigned long WideSquareRoot(const wide *source)
  171. ;
  172.     IF GENERATINGCFM THEN
  173.         IMPORT_CFM_FUNCTION    WideSquareRoot
  174.     ENDIF
  175.  
  176. ;
  177. ; WidePtr WideMultiply(long multiplicand, long multiplier, wide *target)
  178. ;
  179.     IF GENERATINGCFM THEN
  180.         IMPORT_CFM_FUNCTION    WideMultiply
  181.     ENDIF
  182.  
  183. ; returns the quotient 
  184. ;
  185. ; long WideDivide(const wide *dividend, long divisor, long *remainder)
  186. ;
  187.     IF GENERATINGCFM THEN
  188.         IMPORT_CFM_FUNCTION    WideDivide
  189.     ENDIF
  190.  
  191. ; quotient replaces dividend 
  192. ;
  193. ; WidePtr WideWideDivide(wide *dividend, long divisor, long *remainder)
  194. ;
  195.     IF GENERATINGCFM THEN
  196.         IMPORT_CFM_FUNCTION    WideWideDivide
  197.     ENDIF
  198.  
  199. ;
  200. ; WidePtr WideBitShift(wide *src, long shift)
  201. ;
  202.     IF GENERATINGCFM THEN
  203.         IMPORT_CFM_FUNCTION    WideBitShift
  204.     ENDIF
  205.  
  206.     ENDIF
  207.     IF GENERATING68K  ** ¬ GENERATING68881  THEN
  208. ;
  209. ; pascal double_t Frac2X(Fract x)
  210. ;
  211.     IF ¬ GENERATINGCFM THEN
  212.         _Frac2X:    OPWORD    $A845
  213.     ELSE
  214.         IMPORT_CFM_FUNCTION    Frac2X
  215.     ENDIF
  216.  
  217. ;
  218. ; pascal double_t Fix2X(Fixed x)
  219. ;
  220.     IF ¬ GENERATINGCFM THEN
  221.         _Fix2X:    OPWORD    $A843
  222.     ELSE
  223.         IMPORT_CFM_FUNCTION    Fix2X
  224.     ENDIF
  225.  
  226. ;
  227. ; pascal Fixed X2Fix(double_t x)
  228. ;
  229.     IF ¬ GENERATINGCFM THEN
  230.         _X2Fix:    OPWORD    $A844
  231.     ELSE
  232.         IMPORT_CFM_FUNCTION    X2Fix
  233.     ENDIF
  234.  
  235. ;
  236. ; pascal Fract X2Frac(double_t x)
  237. ;
  238.     IF ¬ GENERATINGCFM THEN
  239.         _X2Frac:    OPWORD    $A846
  240.     ELSE
  241.         IMPORT_CFM_FUNCTION    X2Frac
  242.     ENDIF
  243.  
  244.     ELSE
  245. ;
  246. ; pascal double_t Frac2X(Fract x)
  247. ;
  248.     IF GENERATINGCFM THEN
  249.         IMPORT_CFM_FUNCTION    Frac2X
  250.     ENDIF
  251.  
  252. ;
  253. ; pascal double_t Fix2X(Fixed x)
  254. ;
  255.     IF GENERATINGCFM THEN
  256.         IMPORT_CFM_FUNCTION    Fix2X
  257.     ENDIF
  258.  
  259. ;
  260. ; pascal Fixed X2Fix(double_t x)
  261. ;
  262.     IF GENERATINGCFM THEN
  263.         IMPORT_CFM_FUNCTION    X2Fix
  264.     ENDIF
  265.  
  266. ;
  267. ; pascal Fract X2Frac(double_t x)
  268. ;
  269.     IF GENERATINGCFM THEN
  270.         IMPORT_CFM_FUNCTION    X2Frac
  271.     ENDIF
  272.  
  273.     ENDIF
  274.     ENDIF ; __FIXMATH__
  275.